home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / login / sac-1.000 / sac-1 / sac-1.3.1 / Makefile < prev    next >
Makefile  |  1996-05-27  |  1KB  |  50 lines

  1. # $Copyright: $
  2. # Copyright (c) 1995 by Steve Baker
  3. # All Rights reserved
  4. #
  5. # This software is provided as is without any express or implied
  6. # warranties, including, without limitation, the implied warranties
  7. # of merchant-ability and fitness for a particular purpose.
  8. #
  9. # Thanks to Edward S. Marshall for extending the Makefile.
  10. #
  11.  
  12. CC=gcc
  13. CFLAGS=-O2 -fomit-frame-pointer -m486
  14. LDFLAGS=-s
  15.  
  16. SAC_DEST=sac
  17. RAW_DEST=rawtmp
  18. BINDIR=/usr/local/bin
  19. MANS=sac.8 rawtmp.1
  20. MANDIR=/usr/man
  21.  
  22. all:    sac rawtmp
  23.  
  24. sac:    sac.o
  25.     $(CC) $(LDFLAGS) -o $(SAC_DEST) sac.o
  26.  
  27. sac.o:    sac.c
  28.  
  29. rawtmp:    rawtmp.o
  30.     $(CC) $(LDFLAGS) -o $(RAW_DEST) rawtmp.o
  31.  
  32. rawtmp.o:    rawtmp.c
  33.  
  34. clean:
  35.     if [ -e $(SAC_DEST) ]; then rm $(SAC_DEST); fi
  36.     if [ -e $(RAW_DEST) ]; then rm $(RAW_DEST); fi
  37.     if [ -e sac.o -o -e raw.o ]; then rm *.o; fi
  38.  
  39. install:
  40.     if [ -e $(SAC_DEST) ]; then \
  41.         install $(SAC_DEST) $(BINDIR)/$(SAC_DEST); \
  42.     fi
  43.     if [ -e $(RAW_DEST) ]; then \
  44.         install $(RAW_DEST) $(BINDIR)/$(RAW_DEST); \
  45.     fi
  46.     for man in $(MANS); do \
  47.         m=`expr match $$man '.*\(.\)'`; \
  48.         install $$man $(MANDIR)/man$$m/$$man; \
  49.     done
  50.